package com.cloud.message.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 延时消息
 * </p>
 *
 * @author wenjin
 * @since 2020-11-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("msg_delay")
public class MessageDelay implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 消息级别
     */
    @TableField("level")
    private String level;

    /**
     * 消息主题
     */
    @TableField("topic")
    private String topic;

    /**
     * 消息内容
     */
    @TableField("content")
    private String content;

    /**
     * 关键Key
     */
    @TableField("hash_key")
    private String hashKey;

    /**
     * 延时秒数
     */
    @TableField("delay_seconds")
    private Integer delaySeconds;

    /**
     * 用户的版本
     */
    @TableField("user_version")
    private String userVersion;

    /**
     * 用户的会话
     */
    @TableField("user_session")
    private String userSession;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;


    public static final String ID = "id";

    public static final String LEVEL = "level";

    public static final String TOPIC = "topic";

    public static final String CONTENT = "content";

    public static final String HASH_KEY = "hash_key";

    public static final String DELAY_SECONDS = "delay_seconds";

    public static final String USER_VERSION = "user_version";

    public static final String USER_SESSION = "user_session";

    public static final String CREATE_TIME = "create_time";

}
